# 边缘检测

import cv2

# 读取图像
image = cv2.imread('./static/1.png')
# image = cv2.resize(image, (500,500))
# 转换为灰度图像
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

# 边缘检测
edges = cv2.Canny(gray_image, 100, 200)

# 显示原始图像和边缘图像
cv2.imshow('Original Image', image)
cv2.imshow('Edges', edges)
cv2.waitKey(0)
cv2.destroyAllWindows()
